﻿using CarAppDomain.CarParts.Entities;
using CarAppDomain.CarType.Entities;
using CarAppDto.CarType.VehicleSeriesDtos;
using D.UtilCore.Dtos;
using D.UtilSqlsugarOrm;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarAppDomain.CarType.IRepository
{
    public interface IVehicleSeriesEntityRepository : IBaseRepository<VehicleSeriesEntity>
    {
        /// <summary>
        /// 获取所有列表
        /// </summary>
        /// <param name="where"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        Task<List<RepVehicleSeries>> GetListAsync(System.Linq.Expressions.Expression<Func<VehicleSeriesEntity, bool>> where = null, System.Linq.Expressions.Expression<Func<VehicleSeriesEntity, object>> order = null);

     
        /// <summary>
        /// 分页查询 加入条件 和 排序
        /// </summary>
        /// <param name="pageSize">每页显示多少条</param>
        /// <param name="current">当前第几页</param>
        /// <param name="where"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        Task<PageModel<RepVehicleSeries>> GetOrderPagesAsync(int pageSize, int current, System.Linq.Expressions.Expression<Func<VehicleSeriesEntity, bool>> where, System.Linq.Expressions.Expression<Func<VehicleSeriesEntity, object>> order = null, bool OrderByAsc = true);

        /// <summary>
        /// 添加配件
        /// </summary>
        /// <param name="model"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<int> AddCarPartsAsync(List<CarPartsVehicleSeriesEntity> modelList);

        /// <summary>
        /// 删除配件
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<int> DeleteCarPartsAsync(List<string> ids);
    }
}
